package com.yl.flink.filter;

import com.yl.constant.CdcType;
import com.yl.entity.cdc.MysqlCdcEntity;
import org.apache.flink.api.common.functions.FilterFunction;

public class TypeFilter implements FilterFunction<MysqlCdcEntity> {

    /**
     * 过滤出测点类型配置流元素
     */
    @Override
    public boolean filter(MysqlCdcEntity mysqlCdcEntity) throws Exception {
        return mysqlCdcEntity.getType().equals(CdcType.TYP);
    }
}
